package cn.msgcode.consumer;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

@RestController
public class RemoteService {

    @Resource
    private RestTemplate restTemplate;

    @RequestMapping("test")
    public String test() {
        return restTemplate.postForObject("http://nacos-provider/config/get", null, String.class);
    }
}
